#pragma once
#include "FrameKey.h"
#include <highgui.h>
#include "stdlib.h"

using namespace std;


class BasePatch
{
protected:
	CvPoint _point;
	FrameKey* _frameKey;

	BasePatch(FrameKey* key, int x, int y) : _frameKey(key)
	{
		_point = cvPoint(x,y);
	}

public:

	inline CvPoint GetPoint() { return _point; }

	template< class T >
	void static ClearPatches(vector<T*>* patches)	
	{
		for (vector<T*>::const_iterator it = patches->begin(); it != patches->end(); ++it)
		{
			T *p = *it;
			delete p;
		}
		patches->clear();
	}

	virtual ~BasePatch(){}

};